<div class="wrapper">
 <?php if(isset($page['header'])):?> 
  <div class="header">
      <?php if ($logo): ?>
       <div class="logo">
          <a href='<?php global $base_url; print $base_url; ?>'>
            <img src="<?php print $logo ?>" alt="<?php print $site_name_and_slogan ?>" title="<?php print $site_name_and_slogan ?>" id="logo" />
           </a>
        </div>
      <?php endif; ?>
      <?php if($login_bar): ?>        
       <div class="header-right">
	      <div class="login-bar"><?php print $login_bar; ?></div>
	      <?php print render($page['header']); ?>
      </div>
      <?php endif; ?>
  </div>
 <?php endif;?>
  <div class="nav-top clearfix"><?php print render($page['header_bottom']); ?></div>
<div class="main clearfix">

	<div class="homepage" id="content">
	<?php //print $breadcrumb; ?>
	
	<?php print render($title_prefix); ?>
	<?php if ($title): ?>
        <h1 class="title" id="page-title">
          <?php print $title; ?>
        </h1>
    <?php endif; ?>
      
      
	<?php if ($tabs): ?><?php print render($tabs); ?><?php endif; ?>
          <?php print render($tabs2); ?>
    <?php if ($show_messages && $messages): print $messages; endif; ?>
    <?php print render($page['help']); ?>
    <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
  	<div class="clear-block">
              <?php print render($page['content']); ?>
  	</div>
	</div>
    <div class="side">
               <?php print render($page['right']); ?>           
  	</div>
    <?php print render($page['crownlogo']); ?>
</div>
 
 <?php if($page['footer']): ?>
	<div class="footer">
	<?php print render($page['footer']); ?>
	</div>
 <?php endif; ?>
 
</div>